package com.sz.common.core.system.service;

import com.sz.common.core.system.entity.SysFile;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * Function: SysFileService <br>
 * Author: Charles <br>
 * Date: 2016-12-12 17:49:00
 */
public interface SysFileService {
    /**
     * @param domainId
     * @param catalog
     * @param fileName
     * @param contentType
     * @param description
     * @param file
     * @return 文件
     */
    SysFile uploadFile(int domainId, String catalog, String fileName,
                       String contentType, String description, MultipartFile file) throws IOException;

    /**
     * @param fileId
     * @param catalog
     * @param fileName
     * @param contentType
     * @param description
     * @param isTempFile
     */
    void updateFileInfo(String fileId, String catalog, String fileName, String contentType,
                        String description, boolean isTempFile, int domainId);

    /**
     * @param files
     */
    void updateFileInfo(List<SysFile> files);

    /**
     * @param fileId
     */
    void removeFile(String fileId);

    /**
     * @param fileId
     * @return
     */
    SysFile getFileInfo(String fileId);
    /**
     * @param fileIds fileIds
     * @return
     */
    List<SysFile> getFileInfos(List<String> fileIds);

    /**
     * @param fileId
     * @return
     */
    SysFile getFileContent(String fileId);

    SysFile  uploadFile(int domainId, String catalog, String fileName, String contentType, String description, String fullPath,Long fileSize);

    /**
     * 产品所有图片
     * @return
     */
    List<SysFile> allProductFiles();
}
